package com.jsm.tf.service;

import com.jsm.tf.entity.User;
import com.jsm.tf.exception.BusinessException;
import com.jsm.tf.net.NettyClient;
import com.jsm.tf.net.message.request.LoginMessage;
import com.jsm.tf.net.message.response.LoginResponseMessage;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;

import javax.annotation.Resource;

@Service
public class UserService extends BaseService {

    @Resource
    private NettyClient nettyClient;


    public void register(String username, String password, String nickname) throws BusinessException {

    }


    public void login(String username, String password) {
        LoginMessage loginMessage = new LoginMessage();
        loginMessage.setUsername(username);
        loginMessage.setPassword(password);
        nettyClient.sendMsg(loginMessage);
//        LoginResponseMessage response = nettyClient.sendSyncMsg(loginMessage);
//        return response.getUser();
    }
}
